﻿namespace HNAlbum.Logic.Entity
{
    /// <summary>
    /// 
    /// </summary>
    public class HNAlbumUser : EntityBase
    {
        public enum SecurityRole
        {
            Administrator,
            User,
        }

        #region Properties
        private string _login = string.Empty;

        public string Login
        {
            get { return _login; }
            set { _login = value; }
        }
        private string _password = string.Empty;

        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }
        private string _name = string.Empty;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        private string _email = string.Empty;

        public string Email
        {
            get { return _email; }
            set { _email = value; }
        }

        private SecurityRole _role = SecurityRole.User;

        public SecurityRole Role
        {
            get { return _role; }
            set { _role = value; }
        }
        #endregion

        #region Public methods
        /// <summary>
        /// Validate user login
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        public bool ValidateLogin(string userName, string passWord)
        {
            return (userName.Equals(_login) && passWord.Equals(_password));
        }

        /// <summary>
        /// Create an user
        /// </summary>
        /// <returns></returns>
        public bool Create()
        {
            bool result = false;

            return result;
        }

        /// <summary>
        /// Update an user details
        /// </summary>
        /// <returns></returns>
        public bool Update()
        {
            bool result = false;

            return result;
        }
        #endregion
    }
}
